home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 February / macformat-034.iso / mac / Shareware City / Developers / simple-sockets-11-c / Simple Sockets 1.1 ƒ / ip ƒ / ipdr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-02  |  600 b   |  50 lines  |  [TEXT/CWIE]

  1. /*
  2.  * ipdr.c
  3.  *
  4.  * Internet Protocol Data Representation
  5.  *
  6.  * This file should remove some of the burden from ip.c
  7.  *
  8.  * MDT 19 JAN 95
  9.  */
  10.  
  11. #include "ipdr.h"
  12.  
  13. /**
  14.  **
  15.  ** DATA REPRESENTATION
  16.  **
  17.  **/
  18.  
  19.  
  20. /* htons, ntohs
  21.  * - convert short data-types from host to network byte order and vice versa.
  22.  */
  23.  
  24. int htons(int x)
  25. {
  26.     /* Welcome to Macintosh */
  27.     return (x);
  28. }
  29.  
  30. int ntohs(int x)
  31. {
  32.     /* Welcome to Macintosh */
  33.     return (x);
  34. }
  35.  
  36.  
  37.  
  38. /* htonl, ntohl
  39.  * - convert long data-types from host to network byte order and vice versa.
  40.  */
  41.  
  42. long htonl(long y)
  43. {
  44.     return (y);
  45. }
  46.  
  47. long ntohl(long y)
  48. {
  49.     return (y);
  50. }